package cc.marcio.systems.seven.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

@Entity
@Table(name = "t_planet", uniqueConstraints = { @UniqueConstraint(columnNames = {"round_id","user_id"}) })
public class Planet implements Serializable {

	private static final long serialVersionUID = -1262813973424015745L;

	@EmbeddedId
	private PlanetId id;
	
	@Column( nullable = false, unique = false, insertable = true, updatable = true )
	private Integer sector;
	
	@Column( nullable = false, unique = false, insertable = true, updatable = true )
	private Integer galaxia;
	
	@Column( nullable = false, unique = false, insertable = true, updatable = true )
	private Integer slot;

	@Column( nullable = false, unique = false, insertable = true, updatable = true )
	private String name;
	
	public Planet() { }
	
	public Planet(PlanetId id) {
		this();
		this.id = id;
	}
	
	public PlanetId getId() {
		return id;
	}

	public void setId(PlanetId id) {
		this.id = id;
	}

	public Integer getSector() {
		return sector;
	}

	public void setSector(Integer sector) {
		this.sector = sector;
	}

	public Integer getGalaxia() {
		return galaxia;
	}

	public void setGalaxia(Integer galaxia) {
		this.galaxia = galaxia;
	}

	public Integer getSlot() {
		return slot;
	}

	public void setSlot(Integer slot) {
		this.slot = slot;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
}